/**
 * @file
 * @author dousha
 * @date 2020-06-21
 */

#ifndef COMPLEX_H
#define COMPLEX_H

/**
 * 表示一个复数
 */
typedef struct {
    /// 实部
    float real;
    /// 虚部
    float imag;
} Complex;

extern void complex_from_euler(Complex *, float, float);

extern void complex_add(Complex *, const Complex *);

extern void complex_subtract(Complex *, const Complex *);

extern void complex_multiply(Complex *, const Complex *);

extern void complex_divide(Complex *, const Complex *);

extern float complex_length(const Complex *);

extern float complex_angle(const Complex *);

#endif
